var express=require('express');
var app=express();
var bodyParser=require('body-parser');   
var db=require('./model/db.js');

                       //这些设定好之后post请求了就有了req.body了
app.use(bodyParser.urlencoded({ extended: false }))  
app.use(bodyParser.json())


app.set('view engine','ejs');  
app.use(express.static('./public'))

app.get('/', function (req, res,next) {
    db.find("www",{},function(err,data){
       console.log(data)
         res.render('02',{cont:data})
    })
})
app.post('/tijiao', function (req, res) {

})

app.listen(3000)